package thesis.database;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.sql.DataSource;

public interface TaxiDAO {
	/**
	 * This is the method to be used to initialize database resources ie.
	 * connection.
	 */
	public void setDataSource(DataSource ds);

	/**
	 * This is the method to be used to create a record in the Taxi table.
	 */
	public void create(Taxi t);

	/**
	 * This is the method to be used to list down a record from the Taxi table
	 * corresponding to a passed Taxi id.
	 */
	public Taxi getTaxi(Integer id);
	
	/**
	 * This is the method to be used to list down a record from the Taxi table
	 * corresponding to a passed Taxi imei.
	 */
	public Taxi getTaxiByImei(String imei);


	/**
	 * This is the method to be used to list down all the records from the Taxi
	 * table.
	 */

	public List<Taxi> getTaxiesByNumber(String numberPlate);

	public List<Taxi> listTaxies();

	/**
	 * This is the method to be used to delete a record from the Taxi table
	 * corresponding to a passed Taxi id.
	 */
	public void delete(Integer id);

	/**
	 * This is the method to be used to update a record into the Taxi table.
	 */
	public void update(Taxi t);
	
	/**
	 * This is the method to be used to update a record into the Taxi table by  imei.
	 */
	public void updateByImei(String imei,int status,String longitude,String latitude);

	/**
	 * This is the method to be used to get list taxi the Taxi table.
	 */
	public List<Integer> getListTaxiIdByBoundingCoordinates(double minLat,
			double minLon, double maxLat, double maxLon, int numberOfSeat);

	public String getNumberPlateById(Integer taxiId);

	// ///////////////////////////////////DEMO//////////////////////////////////////

	public int getPortById(int id);

	public String getNumberPlateByImei(String emei);
	
	public String getImeiById(int id);

}
